[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
InKeyWait ([nSecs]) --> nKey:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Functions:
~~~~~~~~~~
The same as InKey(), but if it was pressed a key which activates a code block
set by SetKey(), this code block is performed. Inkey() only returns the key
code InkeyWait() returns it too and if there is assigned code block it is
performed.
Parameter description:
~~~~~~~~~~~~~~~~~~~~~~
nSecs: time (in seconds) how long to wait for a keypressing
Return value:
~~~~~~~~~~~~~
keypressed code
Example:
~~~~~~~~
SetKey(K_F1,{||HelpKeys()})
? InKeyWait(0)
...
It hangs on the F1 key the function HelpKeys() and waits for a keypressing.
if there was pressed a F1 key the HelpKeys() function is performed and the
inkey code of F1 code is printed, if there was other key pressed (without
assigned a function), only a pressed key code is printed.
Source code is in file Object3.prg
See Also:
PauseKey
StuffKey
StuffKeys
SetLastKey
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson